package com.ljh.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author ：刘剑鸿
 * @date ：Created in 2021/11/21 19:27
 * @description：MyBatisPlus配置类
 * @modified By：
 * @version: $
 */
@MapperScan("com.ljh.mapper")
@EnableTransactionManagement    //开启自动管理事务
@Configuration  //配置类
public class MyBatisPlusConfig {
    @Bean
    // 逻辑删除组件
    public ISqlInjector sqlInjector(){
        return new LogicSqlInjector();
    }
}
